#ifndef TIPAREA_H
#define TIPAREA_H

#include <QGraphicsObject>
#include <QComboBox>
#include <QGraphicsProxyWidget>
class TipArea : public QGraphicsObject
{
    Q_OBJECT
public:
    TipArea();
    QRectF boundingRect() const;
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
    void setMsg(QString msg);
    void addBoxItem(QString text);
    void reset();
    void showBox();
    int getBoxCurrentIndex(){return box->currentIndex();}
    QString getBoxCurrentText(){return box->currentText();}

private:
    int width;
    int height;
    QPixmap background;
    QString msg;
    QComboBox *box;
    QGraphicsProxyWidget *boxItem;

};

#endif // TIPAREA_H
